package cn.pfz.mapper;

import cn.pfz.domain.BusinessReport;
import cn.pfz.domain.Consumption;
import cn.pfz.domain.ConsumptionExample;
import cn.pfz.domain.ConsumptionKey;
import cn.pfz.query.BusinessReportQuery;
import cn.pfz.query.ConsumptionQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ConsumptionMapper {
    
    int countByExample(ConsumptionExample example);
    
    int deleteByExample(ConsumptionExample example);
    
    int deleteByPrimaryKey(ConsumptionKey key);
    
    List<Consumption> selectByExample(ConsumptionExample example);
    
    int updateByExampleSelective(@Param("record") Consumption record,
                                 @Param("example") ConsumptionExample example);
    
    int updateByExample(@Param("record") Consumption record,
                        @Param("example") ConsumptionExample example);
    
    Consumption selectByPrimaryKey(ConsumptionKey key);
    
    //带有selective的方法是可以处理参数为空的方法，防止修改时由于空值覆盖
    int updateByPrimaryKeySelective(Consumption record);
    
    //这种方法可以设置属性为null值
    int updateByPrimaryKey(Consumption record);
    
    int insert(Consumption record);
    
    int insertSelective(Consumption record);
    
    List<Consumption> selectAll();
    
    List<Consumption> selectForList(ConsumptionQueryObject qo);
    
    Consumption selectByCno(String cno);
    
    List<BusinessReport> selectBusinessReportData(BusinessReportQuery qo);

    
}